<!-- 普通用户 -->
<template>
  <div class="box">
    <div></div>
    <div class="box-putong">
      <van-form @submit="onSubmit">
        <van-field
          v-model="username"
          name="用户名"
          label="用户名"
          placeholder="用户名"
          :rules="[{ required: true, message: '请填写用户名' }]"
        />
        <van-field
          v-model="password"
          type="password"
          name="密码"
          label="密码"
          placeholder="密码"
          :rules="[{ required: true, message: '请填写密码' }]"
        />
        <div style="margin: 16px" class="yonghu-denglu">
          <!-- <van-button round block type="info" native-type="submit"
            >提交</van-button
          > -->
          <router-link to="/about">用户登录</router-link>
        </div>
      </van-form>
    </div>
    <div></div>
  </div>
</template>

<script>
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data() {
    //这里存放数据
    return {
      username: "",
      password: "",
    };
  },
  //监听属性 类似于data概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {
    onSubmit(values) {
      console.log("submit", values);
    },
  },
  //生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
};
</script>
<style lang='scss' scoped>
.box {
  width: 100%;
  height: 100%;
  background: rgb(250, 236, 175);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.box-putong {
  background: rgb(255, 255, 255);
}
.yonghu-denglu {
  width: 90%;
  height: 40px;
  background: rgb(86, 181, 245);
  text-align: center;
  line-height: 40px;
  border-radius: 20px;
  font-weight: bolder;
}
.yonghu-denglu a {
  color: #fff;
}
</style>